package net.wanho.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * Author：汤小洋
 * Date：2025-06-30 17:05
 * Description：<描述>
 */
@Component
public class MyTask {

    // @Scheduled(cron = "*/2 * * * * ?")
    @Scheduled(cron = "0 0 3 * * 1,3,5") // 每周一三五的凌晨3点执行
    public void task1(){
        System.out.println("定时任务执行了......." + LocalDateTime.now());
    }

}
